﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Classwork03
{
    class Circle:Graph
    {
        private string shape;
        private double radius;

        public Circle(double _radius, string _shape) : base(_shape)
        {
            radius = _radius;
            this.shape = base.shape;
        }

        public override double CalculateArea()
        {
            return radius * radius * System.Math.PI;
        }

        public override bool IsLegal()
        {
            if (radius > 0 && shape == "Circle")
                return true;
            else
                return false;
        }
    }
}
